import React from 'react'
import PropTypes from 'prop-types'
import { View, Text, StyleSheet, Image } from 'react-native'
import { ScaleT, ScaleS } from 'src/utils/ScreenUtil'
import CustomImage from 'src/components/image/CustomImage'
import CustomButton from 'src/components/button/CustomButton'
const triangleArrowRight = require('@/imgC/home/triangle.png')

export default class JobManage extends React.PureComponent {
  static propTypes = {
    jobData: PropTypes.object,
    jobClick: PropTypes.func
  }

  render () {
    const { jobData, jobClick } = this.props
    return (
      <View style={styles.container}>
        <Text style={styles.manageTitle}>职位管理</Text>
        <View style={styles.myJobContentView}>
          <CustomButton
            style={styles.myJobContentItemVIew}
            params={0}
            onPress={jobClick}
          >
            <CustomImage
              style={styles.myJobContentItemImg}
              source={require('@/imgC/company/icon_job1.png')}
            />
            <Text style={styles.myJobContentItemLabel}>兼职岗位</Text>
            <Text style={styles.myJobContentItemRightLabel}>去发布</Text>
            <CustomImage
              style={styles.myJobContentItemRightImg}
              source={triangleArrowRight}
            />
          </CustomButton>
          <CustomButton
            style={styles.myJobContentItemVIew}
            params={2}
            onPress={jobClick}
          >
            <CustomImage
              style={styles.myJobContentItemImg}
              source={require('@/imgC/company/icon_job2.png')}
            />
            <Text style={styles.myJobContentItemLabel}>实习岗位</Text>
            <Text style={styles.myJobContentItemRightLabel}>去发布</Text>
            <CustomImage
              style={styles.myJobContentItemRightImg}
              source={triangleArrowRight}
            />
          </CustomButton>
          <CustomButton
            style={styles.myJobContentItemVIew}
            params={1}
            onPress={jobClick}
          >
            <CustomImage
              style={styles.myJobContentItemImg}
              source={require('@/imgC/company/icon_job3.png')}
            />
            <Text style={styles.myJobContentItemLabel}>全职岗位</Text>
            <Text style={styles.myJobContentItemRightLabel}>去发布</Text>
            <CustomImage
              style={styles.myJobContentItemRightImg}
              source={triangleArrowRight}
            />
          </CustomButton>
        </View>
      </View>
    )
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    marginTop: ScaleS(25),
    marginHorizontal: ScaleS(20)
  },
  manageTitle: {
    color: '#000000',
    fontSize: ScaleT(25),
    lineHeight: ScaleS(36),
    fontWeight: '500'
  },
  myJobContentView: {
    marginTop: ScaleS(2)
  },
  myJobContentItemVIew: {
    flexDirection: 'row',
    alignItems: 'center',
    marginTop: ScaleS(31),
    height: ScaleS(24)
  },
  myJobContentItemImg: {
    width: ScaleS(24),
    height: ScaleS(22),
    marginRight: ScaleS(14)
  },
  myJobContentItemLabel: {
    color: '#444444',
    fontSize: ScaleT(17),
    fontWeight: '400'
  },
  myJobContentItemRightLabel: {
    flex: 1,
    textAlign: 'right',
    color: '#A5A5A5',
    fontSize: ScaleT(15),
    fontWeight: '400',
    marginRight: ScaleS(12)
  },
  myJobContentItemRightImg: {
    width: ScaleS(7),
    height: ScaleS(5),
    transform: [{ rotate: '-90deg' }]
  }
})
